1) Field of the Invention
The present invention relates to an apparatus for recognizing and locating a desired object from images including objects to be detected with high accuracy. Specifically, the present invention also relates to an apparatus which identifies a position/orientation of each object, judges whether or not each object is an intended one, extracts the uppermost object out of objects which are overlapped above and below, and checks whether each object is one with a flaw. The present apparatus can be applied to a visual recognition system suitable for use in a robot.
2) Description of the Prior Art
As one of apparatus for recognizing objects, the following apparatus has heretofore been known. In the apparatus, a scene including the object to be recognized is pictured and geometrical elements about the shapes of objects, for example, the fragments of corners, circles and straight lines representing objects and the like, are extracted from the resultant image data. The search is then made so as to select some of the geometrical elements of each object extracted, which match the geometrical model composed of model elements representing the shape of a model object which has been given in advance. Thus, a desired object can be recognized by the geometrical elements of each object, which are obtained as a result of such a search. This type of apparatus and the method for recognition of the objects are e.g. disclosed in Japanese Patent Laid-Open Nos. 111575/1984, 204086/1985 and 269287/1987.
The following is known to date as an alternative to the apparatus and the method for recognition of the objects described above. A position/orientation of each object to be recognized is detected using the fragments of corners and circles as parts of objects. The points on a contour line of each model, which has been mapped on the binary image, are next traced at an interval of a given distance. Costs corresponding to the results of a judgment made as to whether or not the contour line of each object extracted exists on the binary image at each point on the contour line are computed in simple manner over all the contour lines of the model. In addition, the sum of the costs are then compared with the predetermined threshold. When they exceed the predetermined threshold, the intended object is recognized as an object to be detected.
The former, i.e., the first method described above needs plenty of geometrical features extracted. So, such systems often produce miss-matching with bad location of object.
This is because there are few features such as a circle, a corner, a long straight line, etc. in shape of model. Even in the case of objects to be recognized having in abundance the features, using the present technology of the edge detection, it is difficult to detect such features sufficient for watching.
Matching the models of few features will often cause the case where they cannot be checked or where they are brought into false alignment.
On the other hand, the latter, i.e., the second method is not enough to solve the problem of the miss-matching judging from the following points:
(1) A method of providing the threshold is not automatic because of no provision of a learning means.
(2) Each of pseudo contour lines other than each contour line of desired each object to be recognized is often extracted under the influence of a shadow, noise caused by the illumination or an object with backgrounds, in the image recognition used for factory automation. Thus occurrence in miss-matching arises owing to extraction of each pseudo contour line and it results in low reliability in industrial application. Verification should be made also for the inside or outside of each object to be recognized, as well as each contour line of each object. Also verification should be performed as to whether or not each contour line exists at a position where the contour line should not be present. It is also necessary to provide a mechanism for closely observing positions where the shadows are liable to occur.
(3) In the field of application of visual recognition apparatus suitable for use in a robot, it is necessary to perform various inspections, for example, inspections of distinguishing different type of objects and flaws and a judgment as to whether or not overlapped part is located in a top position. In the second method, no realization is yet made with respect to a universal technique for learning information about which portion should closely be observed and verifying the same.